﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BotvaBot.Processor;
using BotvaBot.Configuration.Personaj;

namespace BotvaBot
{
    public partial class UcPersonajCommands : UserControl
    {
        public PersonajCfg Personaj { get; set; }

        protected BotvaWorkProcessesManager WorkProcessesManager { get; set; }


        public UcPersonajCommands()
        {
            InitializeComponent();
        }


        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            WorkProcessesManager = new BotvaWorkProcessesManager(Personaj);

            PeriodicProcessor<object> ppWorkInKarier = new PeriodicProcessor<object>(WorkProcessesManager.WorkInKarier, null);
            ucPpWorkInKarier.ProcessManager = ppWorkInKarier;

            PeriodicProcessor<object> ppSendBoat = new PeriodicProcessor<object>(WorkProcessesManager.SendBoat, null);
            ucPpSendBoat.ProcessManager = ppSendBoat;

            PeriodicProcessor<object> ppSendLetun = new PeriodicProcessor<object>(WorkProcessesManager.SendLetun, null);
            ucPpLetun.ProcessManager = ppSendLetun;

            PeriodicProcessor<object> ppDrink = new PeriodicProcessor<object>(WorkProcessesManager.Drink, null);
            ucPpDrink.ProcessManager = ppDrink;

            PeriodicProcessor<object> ppTest = new PeriodicProcessor<object>(WorkProcessesManager.Test, null);
            ucPpTest.ProcessManager = ppTest;
        }
    }
}
